package com.example.java0317springboot.iocdemo;

public class HouseTest {
    public static void main(String[] args){
        //硬编码方式创建对象
       AC ac = new HuoyeAC();
       TV tv = new HaideTV();
        //设置电脑属性
        House house = new House();
        house.setAC(ac);
        house.setTV(tv);
        //开机
        house.openDoor();
    }
}
